const request = require('./request')

const USER_NAME = 'Lifaliang1996'

const getUser = () => {
  return request({
    url: `/users/${USER_NAME}`
  })
}

const getProject = () => {
  return request({
    url: `/users/${USER_NAME}/repos?page=1`
  })
}

const getReadme = name => {
  return request({
    url: `/repos/${USER_NAME}/${name}/contents/README.md`
  })
}

const getFollowings = name => {
  return request({
    url: `/users/${USER_NAME}/following`
  })
}

module.exports = {
  getUser,
  getProject,
  getReadme,
  getFollowings
}
